package com.quanyan.runningriding.web.running;

import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.common.utils.DateUtils;
import com.quanyan.common.utils.StringUtil;
import com.quanyan.runningriding.entity.db.TbRunSuggest;
import com.quanyan.runningriding.entity.db.TbRunSuggestExample;
import com.quanyan.runningriding.entity.vo.run.req.RunSuggestVo;
import com.quanyan.runningriding.entity.vo.run.resp.RunSuggest;
import com.quanyan.runningriding.service.RunSuggestService;
import com.quanyan.runningriding.util.CommonUtil;
import com.quanyan.runningriding.util.RunEnum;
import org.apache.commons.collections.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author zhiru.tan
 * @date 2016/9/21 0021
 */
@RestController
@RequestMapping(value = "/api/run")
public class RunSuggestController {
    @Autowired
    private RunSuggestService runSuggestService;
    private Logger logger = LoggerFactory.getLogger(RunSuggestController.class);

    @RequestMapping(value = "/suggest", method = RequestMethod.POST)
    public APIResponse<?> suggest(@RequestBody @Valid RunSuggestVo runSuggestVo) {
        return runSuggestService.suggest(runSuggestVo);
    }


}
